#ifndef __JSON_SETTINGS__
#define __JSON_SETTINGS__

#include <QSettings>

#define JSON_FORMAT     				QSettings::Format(12)

namespace JSONSettings {

	#define SETTING_ORGANIZATION_NAME	"YINJIA"
	#define SETTING_DOMAIN_NAME			"ronghe.com.cn"
	#define SETTING_APPLICATION_NAME	"rh530"

	#define JSON_DEVICE_VENDOR_NAME		"rh530/vendor_name"
	#define JSON_DEVICE_VENDOR			"rh530/vendor"
	#define JSON_DEVICE_ID				"rh530/id"
	#define JSON_DEVICE_NAME			"rh530/name"
	#define JSON_DEVICE_CLIENT_NAME		"rh530/client_name"
	#define JSON_DEVICE_TERMINAL_NAME	"rh530/terminal_name"
	#define JSON_DEVICE_TERMINAL_ID		"rh530/terminal_id"

	#define JSON_HTTP_SERVER_IP			"http/server_name"
	#define JSON_HTTP_AUTHENTICATE_CODE	"http/auth_code"
	#define JSON_HTTP_PRIVATE_KEY		"http/private_key"
	#define JSON_HTTP_HEARTBREAK_PERIOD	"http/heartbreak_period"
	#define JSON_HTTP_TRANSFER_TIMEOUT	"http/transfer_timeout"

	#define JSON_MQTT_HOST				"mqtt/server_name"
	#define JSON_MQTT_PORT				"mqtt/port"
	#define JSON_MQTT_USERNAME			"mqtt/user_name"
	#define JSON_MQTT_PASSWORD			"mqtt/password"
	#define JSON_MQTT_CLIENTID			"mqtt/client_id"
	#define JSON_MQTT_PUBLISH_INTERVAL	"mqtt/publish_interval"
	#define JSON_MQTT_QOS				"mqtt/qos"

	#define JSON_DISPLAY_DEV			"rs232/display/dev"
	#define JSON_DISPLAY_BAUD			"rs232/display/baud"
	#define JSON_DISPLAY_DATABITS		"rs232/display/databits"
	#define JSON_DISPLAY_STOPBITS		"rs232/display/stopbits"
	#define JSON_DISPLAY_PARITY			"rs232/display/parity"
	#define JSON_PRINTER_DEV			"rs232/printer/dev"
	#define JSON_PRINTER_BAUD			"rs232/printer/baud"
	#define JSON_PRINTER_DATABITS		"rs232/printer/databits"
	#define JSON_PRINTER_STOPBITS		"rs232/printer/stopbits"
	#define JSON_PRINTER_PARITY			"rs232/printer/parity"
	#define JSON_NOTECOUNTER_DEV		"rs232/notecounter/dev"
	#define JSON_NOTECOUNTER_BAUD		"rs232/notecounter/baud"
	#define JSON_NOTECOUNTER_DATABITS	"rs232/notecounter/databits"
	#define JSON_NOTECOUNTER_STOPBITS	"rs232/notecounter/stopbits"
	#define JSON_NOTECOUNTER_PARITY		"rs232/notecounter/parity"
	#define JSON_CONTROLBOARD_DEV		"rs232/controlboard/dev"
	#define JSON_CONTROLBOARD_BAUD		"rs232/controlboard/baud"
	#define JSON_CONTROLBOARD_DATABITS	"rs232/controlboard/databits"
	#define JSON_CONTROLBOARD_STOPBITS	"rs232/controlboard/stopbits"
	#define JSON_CONTROLBOARD_PARITY	"rs232/controlboard/parity"
	#define JSON_PAPERCONTROL_DEV		"rs232/papercontrol/dev"
	#define JSON_PAPERCONTROL_BAUD		"rs232/papercontrol/baud"
	#define JSON_PAPERCONTROL_DATABITS	"rs232/papercontrol/databits"
	#define JSON_PAPERCONTROL_STOPBITS	"rs232/papercontrol/stopbits"
	#define JSON_PAPERCONTROL_PARITY	"rs232/papercontrol/parity"

	#define JSON_GPIO_CASEDOOR			"gpio/case_door"
	#define JSON_GPIO_NOTESENSOR1		"gpio/note_sensor1"
	#define JSON_GPIO_NOTESENSOR2		"gpio/note_sensor2"

	#define JSON_FP_DEVICE				"fingerprint/device"

	#define JSON_WORK_AUTO_STORE		"working/auto_note_store"
	#define JSON_WORK_AUTO_COUNT		"working/auto_note_count"
	#define JSON_WORK_USERNAME			"working/user_name"
	#define JSON_WORK_USE_AMOUNT_LIMIT	"working/use_amount_limit"
	#define JSON_WORK_CURR_AMOUNT_LIMIT	"working/note_current_amount_limit"
	#define JSON_WORK_MAX_AMOUNT_LIMIT	"working/note_max_amount_limit"
	#define JSON_WORK_LOGO_FILE			"working/logo"
	#define JSON_WORK_ACCOUNT_FAILED_TRANS	"working/account_failed_trans"

	#define JSON_SURVEILLANCE_DEVICE1	"surveillance/device1"
	#define JSON_SURVEILLANCE_DEVICE2	"surveillance/device2"
	#define JSON_SURVEILLANCE_PATH		"surveillance/video_path"

	#define JSON_DEPOSIT_CATEGORY1		"deposit_category/category1"
	#define JSON_DEPOSIT_CATEGORY2		"deposit_category/category2"
	#define JSON_DEPOSIT_CATEGORY3		"deposit_category/category3"
	#define JSON_DEPOSIT_CATEGORY4		"deposit_category/category4"
	#define JSON_DEPOSIT_CATEGORY5		"deposit_category/category5"
	#define JSON_DEPOSIT_CATEGORY6		"deposit_category/category6"
	#define JSON_DEPOSIT_CATEGORY7		"deposit_category/category7"
	#define JSON_DEPOSIT_CATEGORY8		"deposit_category/category8"

	extern QSettings::Format cJsonFormat;

	bool Initialize();
	QSettings::Format GetFormat();
	QString GetSettingFilePath();

}

#endif  // __JSON_SETTINGS__
